import React from 'react'

import styles from './../../styles/scenes'

import {
  Scene,
  Router,
  Stack,
  Tabs
} from 'react-native-router-flux';

import connectComponent from './../../utils/connectComponent'

import TabIcon from './../../components/common/TabIcon'
import * as IndexScene from './../../components/Index/IndexScene'
import * as DashboardScene from './../../components/Dashboard/DashboardScene'
import * as UserCollectScene from './../../components/Dashboard/UserCollectScene'


const IndexPage = connectComponent(IndexScene)
const DashboardPage = connectComponent(DashboardScene)
const UserCollectPage = connectComponent(UserCollectScene)


module.exports = <Scene key="tabbar"
     tabs={true}
     initial={true}
     labelStyle={styles.sceneTitle}
     activeTintColor='#E12F32'
     animationEnabled
     inactiveBackgroundColor="#fff"
     activeBackgroundColor="#fff"
     tabBarPosition="bottom"
     swipeEnabled={false}
     lazy={true}
     style={{backgroundColor:'#fff'}}
     hideNavBar
     >
    <Scene key="index"  hideNavBar  component={IndexPage}  title="首页" iconName="ios-home" icon={TabIcon} />
    <Scene key="collect"  hideNavBar  component={UserCollectPage} title="我的收藏"  iconName="ios-star" icon={TabIcon}/>
    <Scene key="dashboard" hideNavBar component={DashboardPage} title="个人中心"  iconName="ios-contact" icon={TabIcon}/>
 </Scene>